#pragma once

#include "InputComponent.h"
#include "EnginePointer.h"
#include "RenderComponent.h"
#include "IEngineComponentCollection.h"

#pragma comment(linker, "/INCLUDE:??0GroundInputComponent@@QAE@XZ")

class GroundInputComponent : public InputComponent
{
public:
	GroundInputComponent();
	GroundInputComponent(long long int groundId);
	~GroundInputComponent(void);

	void setGroundId(long long int groundId);

	void getHoldBindings(BYTE** bindings, DWORD* nBindings);
	void keyHold(BYTE key, LONGLONG timeElapsed);

	void Initialize(EnginePointer<IEngineComponentCollection> components);

	void Serialize(EnginePointer<ISerializerWriteContext>& context, char* name);
	static IEngineComponent* Deserialize(EnginePointer<ISerializerReadContext>& context);

	AUTO_SIZE;
private:
	long long int groundId;
	EnginePointer<RenderComponent> ground;
	static BYTE bindings[11];
};
